Skip to main content

Creating and Managing Collections

Collections are the foundation of data management in LiveCode Create. They act as structured datasets that store, organize, and provide access to your app's information. By creating and managing Collections, you can power dynamic and data-driven apps effortlessly.

This guide will show you how to create, organize, and manage Collections effectively.


What is a Collection?

A Collection is a structured dataset that holds records, where:

  • Fields represent the data categories (like columns in a table).
  • Records are the individual entries within the Collection (like rows in a table).

For example, if you are creating an Employee Directory, your Collection might include:

NameJob TitleDepartmentOffice
Alice SmithProject ManagerMarketingLondon
Bob JohnsonSoftware EngineerITNew York

Collections form the basis for Dataviews and can be bound to widgets to display or interact with the data dynamically.


Accessing Collections

To create and manage Collections:

  1. Open the Collections Panel from the left-hand toolbar.
  2. The left panel will display existing Collections and Dataviews.

Creating a Collection

Follow these steps to create a new Collection:

  1. Open the Collections Panel:

    • Click the Collections icon in the left-hand toolbar.
  2. Create a New Collection:

    • Click + New Collection.
    • Give your Collection a clear, descriptive name (e.g., Employees, Tasks, Products).

Create a collection

  1. Add Fields to Your Collection:
    • Define the fields you need in your dataset.
    • Select the appropriate field type for each field:
      • Text: For names, descriptions, or general text.
      • Number: For quantities, prices, or numeric IDs.
      • Date: For dates or timestamps.
      • Enum: An enum is a list of fixed, named choices.

Add Fields

  1. Save Your Collection:
    • Click Create Collection to finalize your new Collection.
    • You will return to an overview screen for the collection.

Overview Screen


Managing Fields in a Collection

Once you have created a Collection, you can modify its fields from the overview screen:

To manage fields:

  1. Open your Collection in the Collections Panel.
  2. Use the Collection overview to make changes:
    • Click + Add Field to add a new field.
    • Double click on an existing field to rename it or change its field type.
    • Use the Delete Icon to remove a field.

Managing Collection Fields


Adding and Managing Records

Once your Collection structure is in place, you can add records (entries):

Adding Records

  1. Open your Collection in the Data Panel.
  2. Click View Records.
  3. Click + Add Record.
  4. Enter data for each field in the record.
  5. Click Add New Record to add the record.

Adding records

Editing Records

  • Double click on an existing record to update its fields.
  • Save changes to ensure the record is updated.

Deleting Records

  • Select the record you want to delete.
  • Click the Delete Icon or press the Delete icon to remove it.

For further learning:

Thank you for your feedback!

Was this page helpful?